<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  </head>
  <body>
    <div id="Application">
      <h1 v-bind:[prop]="name" v-if="show">标题</h1>
    </div>

    <script>
      const { createApp, ref } = Vue;
      let config = {
        setup() {
          const show = ref(true);
          const prop = ref('class')
          const name = ref('h1')
          return { show, name, prop };
        },
      };
      createApp(config).mount("#Application");
    </script>
  </body>
  <style>
    #h1 {
      color: red;
    }
    .h1 {
      color: blue;
    }
  </style>
</html>
